package com.distributed.kv.dto;



import java.util.List;

import javax.validation.constraints.Size;



/**
 * 批量请求对象
 */
public class BatchRequest<T> {

    @Size(min = 1, max = 1000, message = "批量请求项目数量必须在1-1000之间")
    private List<T> items;

    private Integer timeout; // 超时时间(毫秒)

    public BatchRequest() {
    }

    public BatchRequest(List<T> items) {
        this.items = items;
    }

    public List<T> getItems() {
        return items;
    }

    public void setItems(List<T> items) {
        this.items = items;
    }

    public Integer getTimeout() {
        return timeout;
    }

    public void setTimeout(Integer timeout) {
        this.timeout = timeout;
    }
}
